Skip to content

ci: skip scheduled pre-releases when only development files changed - #1934

Merged
eitsupi merged 3 commits into
mainfrom
ci/prerelease-path-filter
Nov 14, 2026
Merged

eitsupi merged 3 commits into
mainfrom
ci/prerelease-path-filter

Conversation

@eitsupi

@eitsupi eitsupi commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Scheduled Marketplace / Open VSX pre-releases currently publish whenever main has a different SHA from the last published run, so CI-only or test-only changes produce new pre-releases.

This keeps the existing publication-history logic (date reservation, last-published SHA search, unchanged-SHA skip) and adds one step for scheduled runs: list the files changed between the last SHA published to both registries and the current SHA, and skip when every change is development-only.

  • The diff is a two-endpoint tree diff (git fetch --depth=1 origin <base> + git diff --no-renames --name-only -z), so the shallow checkout is enough. Ignored-only changes accumulate against the last published SHA, so nothing is lost across skipped days.
  • Ignored paths: .github/**, src/test/**, sess/tests/**, R/tests/**, benchmark and test scripts under scripts/, and development configs. Anything not listed is relevant.
  • Packaging inputs under .github stay relevant: extension-version.js, main.yml, release.yml.
  • A failed fetch or diff publishes as before (diff-unavailable).
  • workflow_dispatch bypasses the filter, so a manual run can still force a pre-release.
  • Only prerelease-prepare enables the filter (PRERELEASE_PATH_FILTER). The registry rechecks do not repeat it, so a fetch that fails in one registry job and succeeds in the other cannot publish to only one registry.
  • main.yml tests and the GitHub latest release are unchanged.

The path list is admittedly fine-grained; a TODO notes that moving the extension into a dedicated subdirectory would let it shrink.

Compare the files changed since the last SHA published to both registries
and skip scheduled pre-releases when every change is CI, test, or other
development-only. Packaging inputs under .github stay relevant, manual runs
bypass the filter, and a failed fetch or diff publishes as before. Only the
preparation job applies the filter so the two registry rechecks cannot
diverge.
@eitsupi
eitsupi marked this pull request as draft November 13, 2026 14:38
@eitsupi
eitsupi marked this pull request as ready for review November 13, 2026 14:40

@renkun-ken renkun-ken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found one retry regression: a full rerun can stop completing a partial publication after a transient Git diff failure recovers. Please preserve the current run's publication eligibility once either registry has attempted publication.

Validation: all 37 workflow-helper tests passed locally, and additional real-Git probes passed in a depth-one clone for baseline fetching, unusual filenames, renames across the ignore boundary, and runtime-file deletion. The retry regression was reproduced against this head and compared with the previous implementation. All eight hosted checks are green at 877809cfe120841312191668d81c480af5be23bb.

@Fred-Wu
Fred-Wu requested a review from renkun-ken November 14, 2026 01:24

@Fred-Wu Fred-Wu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No further actionable issues found.

@renkun-ken renkun-ken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified at ffb048151a42c4d5519dd178b5e050be5e8467ac: the previous P2 is fixed. Once the current run has attempted publication, a full rerun bypasses the path filter and can finish the other registry. Date reservations and completed-publication suppression still take precedence, and preparation-only runs continue to skip ignored-only changes. No further actionable issues found after reviewing the update and discussion.

Validation: all 38 workflow-helper tests pass locally. The original fetch-failure → partial-publication → full-rerun reproduction now stays eligible; additional mixed-attempt, completed-publication and newer-date probes pass. Both workflow-helper CI checks on this head are green. The broader extension matrix passed on the previous head; it has not rerun on this commit.

@eitsupi
eitsupi merged commit 80b16f6 into main Nov 14, 2026
2 checks passed
@eitsupi
eitsupi deleted the ci/prerelease-path-filter branch November 14, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants